$(document).ready(function ()
{
    DefaultIndexView.init();
});

DefaultIndexView = new Object();

DefaultIndexView.props = new Object();

DefaultIndexView.init = function()
{
    // chart new user
    var chart = new OBJ_Chart();
    chart.props.title = 'New User';
    chart.props.type = 'line';
    chart.props.container = 'chart_new_user';
    chart.props.unit = 'user';
    chart.props.categories = PHP_PARAMS.default_index_view.new_user_categories;
    chart.addSeries('New', PHP_PARAMS.default_index_view.new_user_values);
    chart.addSeries('Male', PHP_PARAMS.default_index_view.new_male_values);
    chart.addSeries('Female', PHP_PARAMS.default_index_view.new_female_values);
    chart.render();

    // chart active
    chart = new OBJ_Chart();
    chart.props.title = 'Active User';
    chart.props.type = 'line';
    chart.props.container = 'chart_a1';
    chart.props.unit = 'user';
    chart.props.categories = PHP_PARAMS.default_index_view.active_user_categories;
    chart.addSeries('A1', PHP_PARAMS.default_index_view.a1_values);
    chart.addSeries('A7', PHP_PARAMS.default_index_view.a7_values);
    chart.addSeries('A30', PHP_PARAMS.default_index_view.a30_values);
    chart.render();

    // chart snapshot
    chart = new OBJ_Chart();
    chart.props.title = 'Snapshot';
    chart.props.type = 'line';
    chart.props.container = 'chart_snapshot';
    chart.props.unit = 'action';
    chart.props.categories = PHP_PARAMS.default_index_view.snapshot_categories;
    chart.addSeries('Total', PHP_PARAMS.default_index_view.snapshot_total_values);
    chart.addSeries('Like', PHP_PARAMS.default_index_view.snapshot_like_values);
    chart.addSeries('Dislike', PHP_PARAMS.default_index_view.snapshot_dislike_values);
    chart.render();

    // chart mutual match
    chart = new OBJ_Chart();
    chart.props.title = 'Mutual Match';
    chart.props.type = 'line';
    chart.props.container = 'chart_mutual_match';
    chart.props.categories = PHP_PARAMS.default_index_view.mutual_match_categories;
    chart.addSeries('Mutual Match', PHP_PARAMS.default_index_view.mutual_match_values);
    chart.render();

    // chart search
    chart = new OBJ_Chart();
    chart.props.title = 'Search Nearnow';
    chart.props.type = 'line';
    chart.props.container = 'chart_search';
    chart.props.unit = 'action';
    chart.props.categories = PHP_PARAMS.default_index_view.search_categories;
    chart.addSeries('Search Nearnow', PHP_PARAMS.default_index_view.search_values);
    chart.render();

    // chart send gift
    chart = new OBJ_Chart();
    chart.props.title = 'Send Gift';
    chart.props.type = 'line';
    chart.props.container = 'chart_send_gift';
    chart.props.unit = 'action';
    chart.props.categories = PHP_PARAMS.default_index_view.send_gift_categories;
    chart.addSeries('Send Gift', PHP_PARAMS.default_index_view.send_gift_values);
    chart.render();

    // chart send message
    chart = new OBJ_Chart();
    chart.props.title = 'Send Message';
    chart.props.type = 'line';
    chart.props.container = 'chart_chat';
    chart.props.unit = 'action';
    chart.props.categories = PHP_PARAMS.default_index_view.chat_categories;
    chart.addSeries('Send Message', PHP_PARAMS.default_index_view.chat_values);
    chart.render();

    // chart invite friend
    chart = new OBJ_Chart();
    chart.props.title = 'Invite Friend';
    chart.props.type = 'line';
    chart.props.container = 'chart_invite';
    chart.props.unit = 'action';
    chart.props.categories = PHP_PARAMS.default_index_view.invite_categories;
    chart.addSeries('Invite Friend', PHP_PARAMS.default_index_view.invite_values);
    chart.render();

    // chart view profile
    chart = new OBJ_Chart();
    chart.props.title = 'View Profile';
    chart.props.type = 'line';
    chart.props.container = 'chart_view_profile';
    chart.props.unit = 'action';
    chart.props.categories = PHP_PARAMS.default_index_view.view_profile_categories;
    chart.addSeries('View Profile', PHP_PARAMS.default_index_view.view_profile_values);
    chart.render();
}